/*

* ------------------------------------------------------------------------
* ------------------------------------------------------------------------
* |     Smart-Shop开源商城系统/ Java商城-首选电商平台系统 请务必保留此注释头信息
* |     开源地址: https://gitee.com/ningbo-qishan/gruul-mall
* ------------------------------------------------------------------------
* ------------------------------------------------------------------------
* |     可正常分享和学习源码,未经授权 不可商用！
* |     商业版中台购买/开源版商业授权 联系技术客服
* |     官网:  https://www.73app.cn/
* ------------------------------------------------------------------------
* ------------------------------------------------------------------------
* |     Copyright (c) 2016-2999 宁波启山智软科技有限公司
* |     版权所有 ,侵权必究！
* ------------------------------------------------------------------------

*/
package com.medusa.gruul.integral.api.entity;

import com.baomidou.mybatisplus.annotation.*;
import com.baomidou.mybatisplus.extension.activerecord.Model;
import com.fasterxml.jackson.annotation.JsonFormat;
import com.medusa.gruul.common.data.base.BaseEntity;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;
import lombok.EqualsAndHashCode;
import lombok.experimental.Accessors;

import java.io.Serializable;
import java.time.LocalDateTime;

/**
 * <p>
 * 积分规则表
 * </p>
 *
 * @author xiaoq
 * @since 2019-11-19
 */
@Data
@EqualsAndHashCode(callSuper = true)
@Accessors(chain = true)
@TableName("t_integral_rule")
@ApiModel(value="IntegralRule对象", description="积分规则表")
public class IntegralRule <T extends Model<?>> extends Model<T> implements Serializable {

    private static final long serialVersionUID = 1L;

    @ApiModelProperty(value = "积分规则表id")
    @TableId(value = "integral_rule_id", type = IdType.AUTO)
    private Long integralRuleId;

    @ApiModelProperty(value = "积分商城id")
    @TableField("integral_shop_id")
    private Long integralShopId;

    @ApiModelProperty(value = "积分有效期")
    @TableField("integral_validity")
    private Integer integralValidity;

    @ApiModelProperty(value = "积分使用规则介绍")
    @TableField("use_rule_introduce")
    private String useRuleIntroduce;

    @ApiModelProperty(value = "积分值规则")
    @TableField("integral_rule_info")
    private String integralRuleInfo;

    @ApiModelProperty(value = "积分值获取类型(0.分享 1.登入 2.签到 3.步数)")
    @TableField("rule_type")
    private Integer ruleType;

    @ApiModelProperty(value = "是否开启")
    @TableField("is_open")
    private Boolean open;

	@ApiModelProperty("租户ID")
	private String tenantId;

	@ApiModelProperty("商铺ID")
	@TableField("shop_id")
	private String shopId;

	@JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss")
	@ApiModelProperty("创建时间")
	@TableField(fill = FieldFill.INSERT)

	private LocalDateTime createTime;

	@JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss")
	@ApiModelProperty("更新时间")
	@TableField(fill = FieldFill.INSERT_UPDATE)


	private LocalDateTime updateTime;
	@TableLogic
	@ApiModelProperty("删除状态：0->未删除；1->已删除")
	@TableField(value = "is_deleted", fill = FieldFill.INSERT)
	private Boolean deleted;

}
